#include "sqlite.h"
dbuse db;

extern "C" __declspec(dllexport) bool isConnected()
{
    return db.isConnected;
}

//extern "C" __declspec(dllexport) void setBDName(QString dbName)
//{
//    db.setDBName(dbName);
//}

//extern "C" __declspec(dllexport) void setTableName(QString tableName)
//{
//    db.setTableName(tableName);
//}

extern "C" __declspec(dllexport) bool dbConnect(QString dbName)
{
    return db.dbConnect(dbName);
}

extern "C" __declspec(dllexport) bool dbTableCreate()
{
    return db.dbTableCreate();
}

extern "C" __declspec(dllexport) bool dbExec(QString param)
{
    return db.dbExec(param);
}

extern "C" __declspec(dllexport) bool dbInsert(ArticleStruct artStruct)
{
    return db.dbInsert(artStruct);
}

extern "C" __declspec(dllexport) void dbClose()
{
    db.dbClose();
}

extern "C" __declspec(dllexport) void getModel(QSqlTableModel *model, QString param)
{
    db.getModel(model,param);
}










//extern "C" __declspec(dllexport) QList<float> hw()
//{
//    QList<float> lst;
//    if (!lst1.empty())
//    {
//        lst.append(lst1);
//    }
//    lst.append(0.56);
//    return lst;
//}

//extern "C" __declspec(dllexport) int getNum()
//{
//    return 1;
//}

//extern "C" __declspec(dllexport) void setOlolo(QList<float> lst)
//{
//    lst1.clear();
//    lst1.append(lst);
//}
